<%#
name: Puppet Agent Disable - SSH Default
model: JobTemplate
job_category: Puppet
description_format: Disable Puppet agent
snippet: false
template_inputs:
- name: comment
  required: false
  input_type: user
  description: Reason for disabling the Puppet agent
  advanced: false
provider_type: SSH
kind: job_template
-%>
<% if @host.operatingsystem.family == 'Debian' -%>
export PATH=/opt/puppetlabs/bin:$PATH
<% end -%>
puppet agent --disable "<%= input("comment").present? ? input("comment") : "Disabled using Foreman Remote Execution"  %> - <%= current_user %> - $(date "+%d/%m/%Y %H:%M")"
